import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Day_13_1_参数解析 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<List<Character>> result = new ArrayList<>();
        List<Character> mid = new ArrayList<>();
        String str = sc.nextLine();
        char[] arr = str.toCharArray();
        int count = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == '"'){
                while (arr[i+1] != '"') {
                    mid.add(arr[i+1]);
                }
                result.add(mid);
                count ++;
                mid.clear();
            }
            if (arr[i] == ' ') {
                result.add(mid);
                count ++;
                mid.clear();
            }
            mid.add(arr[i]);
        }
        System.out.println(count);
        for(List<Character> rs : result){
            System.out.println(rs);
        }
    }
}
